{{ define "itying/cart/cart.html" }}
{{ template "itying/public/page_header.html" .}}
<link rel="stylesheet" type="text/css" href="/static/itying/css/cart.css">
<script src="/static/itying/js/cart.js"></script>
<!-- start banner_x -->
		<div class="banner_x center">
			<a href="/"><div class="logo fl"></div></a>
			
			<div class="wdgwc fl ml40">我的购物车</div>
			<div class="wxts fl ml20">温馨提示：产品是否购买成功，以最终下单为准哦，请尽快结算</div>
			<div class="dlzc fr">
				<ul>
					<li><a href="./login.html" target="_blank">登录</a></li>
					<li>|</li>
					<li><a href="./register.html" target="_blank">注册</a></li>	
				</ul>
				
			</div>
			<div class="clear"></div>
		</div>
		<div class="xiantiao"></div>
		<div class="gwcxqbj">
			<div class="gwcxd center">
				<table class="table">

					<tr class="th">
						<th>
								<input type="checkbox" id="checkAll" />
								全选
						</th>
						<th>
						 商品名称
						</th>
						<th>单价</th>
						<th>数量</th>
						<th>小计</th>
						<th>操作</th>
					</tr>
				
			
					{{range $key,$value := .cartList}}

					<tr class="cart_list">

							<td>
									<input type="checkbox"  goods_id="{{$value.Id}}" goods_color="{{$value.GoodsColor}}"  {{if eq $value.Checked true}} checked {{end}} />
							</td>
	
							<td>
									<div class="col_pic">
											<img src="{{$value.GoodsImg | FormatImg}}" />
									</div>
									<div  class="col_title">
										{{$value.Title}} -- {{$value.GoodsColor}} {{$value.GoodsVersion}}										
									</div>
							</td>
	
							<td class="price">
								{{$value.Price}}元
							</td>
	
							<td>
	
								<div class="cart_number">
										<div class="input_left decCart" goods_id="{{$value.Id}}" goods_color="{{$value.GoodsColor}}">-</div>
	
										<div class="input_center">
												<input id="num" name="num" readonly="readonly" type="text" value="{{$value.Num}}" />
										</div>
										<div class="input_right incCart" goods_id="{{$value.Id}}" goods_color="{{$value.GoodsColor}}">+</div>
								</div>
								
							</td>
	
							<td class="totalPrice">
								{{ Mul $value.Price $value.Num}}元						
	
							</td>
							<td>
								<span><a href="/cart/delCart?goods_id={{$value.Id}}&goods_color={{$value.GoodsColor}}" class="delete"> 删除</a></span>
							</td>
					</tr>
				
						{{end}}
				</table>
			</div>
			<div class="jiesuandan mt20 center">
				<div class="tishi fl ml20">
					<ul>
						<li><a href="./liebiao.html">继续购物</a></li>
						<li>|</li>
						<li>共<span>2</span>件商品，已选择<span>1</span>件</li>
						<div class="clear"></div>
					</ul>
				</div>
				<div class="jiesuan fr">
					<div class="jiesuanjiage fl">合计（不含运费）：<span id="allPrice">{{.allPrice}}元</span></div>
					<div class="jsanniu fr"><input class="jsan" id="checkout" type="submit" name="jiesuan"  value="去结算"/></div>
					<div class="clear"></div>
				</div>
				<div class="clear"></div>
			</div>
			
		</div>

		
		<!-- footer -->
		{{ template "itying/public/page_footer.html" .}}
	</body>
</html>
{{end}}